exports.add = function (a,b){
    return a + b
}
exports.mul = function (a,b){
    return a * b
}
// console.log(arguments.callee + "");
/*   每个文件都是一个模块
function (exports, require, module, __filename, __dirname) { 
    exports.add = function (a,b){
        return a + b
    }
    exports.mul = function (a,b){
        return a * b
    }
}
*/
console.log("==============================================")
// console.log(exports);
/**exports是每一个文件下面的一个对象，就是当前模块暴露出去的方法
  *  { add: [Function], mul: [Function] }
 */
console.log("==============================================")
// console.log(require);
/**
 * 

{   [Function: require]
    resolve: { [Function: resolve] paths: [Function: paths] },
    main: Module {
       id: '.',
       exports: {},
       parent: null,
       filename: 'c:\\Users\\qianfeng\\Desktop\\nodejs\\Practice\\practice-module.js',
       loaded: false,
       children: [ [Object] ],
       paths: [ 'c:\\Users\\qianfeng\\Desktop\\nodejs\\Practice\\node_modules',
            'c:\\Users\\qianfeng\\Desktop\\nodejs\\node_modules',
            'c:\\Users\\qianfeng\\Desktop\\node_modules',
            'c:\\Users\\qianfeng\\node_modules',
            'c:\\Users\\node_modules',
            'c:\\node_modules' ] },
    extensions: { '.js': [Function], '.json': [Function], '.node': [Function] },
    cache:
     { 'c:\\Users\\qianfeng\\Desktop\\nodejs\\Practice\\practice-module.js':
        Module {
          id: '.',
          exports: {},
          parent: null,
          filename: 'c:\\Users\\qianfeng\\Desktop\\nodejs\\Practice\\practice-module.js',
          loaded: false,
          children: [Array],
          paths: [Array] },
       'c:\\Users\\qianfeng\\Desktop\\nodejs\\Practice\\define-module.js':
        Module {
          id: 'c:\\Users\\qianfeng\\Desktop\\nodejs\\Practice\\define-module.js',
          exports: [Object],
          parent: [Object],
          filename: 'c:\\Users\\qianfeng\\Desktop\\nodejs\\Practice\\define-module.js',
          loaded: false,
          children: [],
          paths: [Array] } } }
*/          
console.log("==============================================")
// console.log(module);
/**
 * Module {
  id: 'c:\\Users\\qianfeng\\Desktop\\nodejs\\Practice\\define-module.js',
  exports: { add: [Function], mul: [Function] },
  parent:
   Module {
     id: '.',
     exports: {},
     parent: null,
     filename: 'c:\\Users\\qianfeng\\Desktop\\nodejs\\Practice\\practice-module.js',
     loaded: false,
     children: [ [Circular] ],
     paths:
      [ 'c:\\Users\\qianfeng\\Desktop\\nodejs\\Practice\\node_modules',
        'c:\\Users\\qianfeng\\Desktop\\nodejs\\node_modules',
        'c:\\Users\\qianfeng\\Desktop\\node_modules',
        'c:\\Users\\qianfeng\\node_modules',
        'c:\\Users\\node_modules',
        'c:\\node_modules' ] },
  filename: 'c:\\Users\\qianfeng\\Desktop\\nodejs\\Practice\\define-module.js',
  loaded: false,
  children: [],
  paths:
   [ 'c:\\Users\\qianfeng\\Desktop\\nodejs\\Practice\\node_modules',
     'c:\\Users\\qianfeng\\Desktop\\nodejs\\node_modules',
     'c:\\Users\\qianfeng\\Desktop\\node_modules',
     'c:\\Users\\qianfeng\\node_modules',
     'c:\\Users\\node_modules',
     'c:\\node_modules' ] }
*/
console.log("==============================================")
// console.log(__filename);
/**
 * c:\Users\qianfeng\Desktop\nodejs\Practice\define-module.js
 */

console.log("==============================================")
// console.log(__dirname);
/**
 * c:\Users\qianfeng\Desktop\nodejs\Practice
 *  */